package com.gnerv.pabu.plugin.annotation;

import com.gnerv.pabu.plugin.config.AnnotationSettings;
import com.intellij.ide.util.PropertiesComponent;
import com.intellij.openapi.actionSystem.AnAction;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.ui.Messages;

public class SetAuthor extends AnAction {

    private static final String FILE_TYPE_JAVA = "JAVA";

    private AnnotationSettings annotationSettings;

    @Override
    public void actionPerformed(AnActionEvent event) {
        PropertiesComponent instance = PropertiesComponent.getInstance();
        String author = Messages.showInputDialog("作者", "设置作者", Messages.getQuestionIcon());
        annotationSettings = ServiceManager.getService(AnnotationSettings.class);
        annotationSettings.setAuthor(author);
    }
}
